import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class DataSharingService {
  private data: any;

  setData(data: any): Observable<any[]> {
     this.data = data;
     return of(this.data);
  }

  getData(): Observable<any[]> {
    return of (this.data);
  }
}
